package it.low.game.server.client;

import it.low.game.core.element.ActiveElement;
import it.low.game.core.location.MapPoint;
import it.low.game.core.message.ClientEvent;
import it.low.game.core.message.ElementState;
import it.low.game.core.message.PlayerEvent;

import java.util.Collection;
import java.util.Set;

public interface ServerClientInterface {
	
	public int init(long clientId);
	
	public void close(long clientId);
	
	// RECEIVE EVENTS FROM CLIENT
	
	public void receiveClientEvent(ClientEvent clientEvent);
	
	public void receivePlayerEvent(PlayerEvent playerEvent);	
	
	// SEND WORLD STATE TO THE CLIENTS
	
	public void sendWorldState(long elapsedTime);
	
	public ElementState sendPlayerState(long playerId);
	
	public Set<ElementState> sendElementsState(long playerId);
	
	// TO START THE GAME
	
	public ActiveElement loadPlayer(long clientId);
	
	public String[][] loadMap();
	
	public Collection<ActiveElement> loadBots();
	
	public ActiveElement initPlayer(long playerId, int size, MapPoint mapPosition);
		
	public ActiveElement initBot(long botId, int size);
	
}
